import fly from '@/utils/fly'

export function login(username, password, loginType) {
 
  return fly.request("/auth/login", {username:username,password:password,loginType:loginType}, {method:"post"})

  // return fly.request(
  //   '/auth/login',
  //   { username: username, password: password, loginType: loginType },
  //   { method: 'post' }
  // )
  //return request.request("/auth/login", {method:"post"})
  // request.post("/auth/login")
  // return fly.request({
  //   url: '/auth/login',
  //   method:'post'
  // })
}

export function getInfo(token) {
  return request({
    url: '/auth/getUserInfo',
    method: 'post',
    data: { token }
  })
}

export function logout() {

  return fly.request("/auth/logout", {method:"post"})
  // return request({
  //   url: '/auth/logout',
  //   method: 'post'
  // })
}
